﻿#pragma once

#include <QDialog>
#include "ui_Login.h"
#include<Tool/UserInfo.h>
class Login : public QDialog
{
    Q_OBJECT

public:
    Login(QWidget *parent = nullptr);
    ~Login();
    UserInfo GetLoginUser();
private:
    QPixmap getRoundRectPixmap(QPixmap srcPixMap, const QSize &size, int radius);
    const QString strUserInfoFile = QApplication::applicationDirPath() + "/UserInfo.dat";
    void LoadUserInfo();
    void WriteUserInfo();
    void UpdateUI();

public	slots:
    void on_Manager_Btn_clicked();
    void on_Login_Btn_clicked();
    void on_ComboboxIndexChange(const QString& text);
private:
    Ui::LoginClass ui;
    UserInfo _loginUser;
    QList<UserInfo> listUserInfo;

};
